#pragma once

#include "Serializable.h"
#include "StlStringAndStreams.h"
#include "Vectors.h"

class Team;
class ServiceProvider;

struct User : public Serializable
{
	User(ServiceProvider* i_sp, const STL::string& i_name);

	virtual	ZStream& Serialize(ZStream& o_stream) const;
	virtual ZStream& Deserialize(ZStream& i_stream);

	STL::string		m_name;
	Team*			m_team;
	IntVec			m_shortlist;

private:

	ServiceProvider*	m_sp;
};

struct CompareUserTeamPtr
{
	CompareUserTeamPtr(const Team* i_team) : m_team(i_team){}
	bool operator()(const User* i_user)
	{
		return i_user->m_team == m_team;
	}
	const Team* m_team;
};
